package com.mall.orders.controller;



import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.baomidou.mybatisplus.extension.api.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mall.commons.utils.CommonResult;
import com.mall.model.domain.OmsCompanyAddress;
import com.mall.orders.service.OmsCompanyAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;

/**
 * 公司收发货地址表(OmsCompanyAddress)表控制层
 *
 * @author wishmumu
 * @since 2023-03-12 11:15:31
 */
@RestController
@RequestMapping("companyAddress")
public class OmsCompanyAddressController  {
    /**
     * 服务对象
     */
    @Autowired
    private OmsCompanyAddressService omsCompanyAddressService;


    /**
     * 获取所有收货地址
     * @return
     */
    @GetMapping("/list")
    public CommonResult selectAll() {
        List<OmsCompanyAddress> list = omsCompanyAddressService.list();
        return CommonResult.success(list);
    }

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("{id}")
    public CommonResult selectOne(@PathVariable Serializable id) {
        return null;
    }
}

